A 25-year-old man presents to the emergency department with sudden onset of severe testicular pain on the right side. He reports no trauma or previous episodes. On examination, the right testis is swollen, tender, and lies higher in the scrotum compared to the left. The cremasteric reflex is absent on the affected side. What is the most appropriate next step in the management of this patient?